package gof_002_结构型_Structural.gof_001_代理_Proxy.gof_003_DynamicProxy.g_2_cglib;

public class ProxyClient {
    public static void main(String[] args) {
        //郑中基
        Agent agent = new Agent(new ZhenZhongJi());
        ZhenZhongJi proxyObj = (ZhenZhongJi) agent.getProxyObj(ZhenZhongJi.class);
        proxyObj.sing();

        //刘德华
        Agent agent1 = new Agent(new LiuDeHua());
        LiuDeHua proxyObj1 = (LiuDeHua) agent1.getProxyObj(LiuDeHua.class);
        proxyObj1.perform();
    }
}